<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>

    <%@include file="common/head-wangeditor.jsp" %>

</head>

<body>

<%@include file="common/sidebar-manage.jsp" %>

<div class="main-content">
    <div class="fluid-container">
        <div class="content-wrapper">
            <div class="page-section">
                <div class="row">
                    <div class="col-md-12">
                        <h4 class="widget-title">NEW ARTICLE 新增博文</h4>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="articlePictureImg"></div>
                                <div class="article-photo-message"></div>
                                <input type="hidden" name="articlePicture" class="form-control articlePicture">
                                <div class="file-container" style="display: inline-block; position: relative; overflow: hidden; vertical-align: middle; margin-top: 20px;">
                                    <button class="btn btn-primary fileinput-button" type="button">上传显示图</button>
                                    <input type="file" class="articlePictureInput" style="position: absolute;top: 0; left: 0; font-size: 34px; opacity:0">
                                </div>
                            </div>
                            <div class="form-group">
                                <input type="text" class="form-control articleTitle" placeholder="文章标题">
                            </div>
                            <div class="form-group">
                                <div id="toolbar-wangEditor" class="toolbar"></div>
                                <div id="text-wangEditor" class="text"></div>
                            </div>
                            <div class="form-group">
                                <label class="control-label"></label>
                                <div class="article-message"></div>
                            </div>
                            <div class="form-group">
                                <div class="text-center">
                                    <button type="button" class="btn btn-primary" id="addArticleBtn">发表博文</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <hr>

            <%@include file="common/footer.jsp" %>

        </div>
    </div>
</div>

<%@include file="common/end.jsp" %>

<script>
    var E = window.wangEditor;
    var editor = new E("#toolbar-wangEditor", "#text-wangEditor");
    // 图片服务器
    editor.customConfig.uploadImgServer = "/upload";
    editor.customConfig.uploadImgMaxSize = 3 * 1024 * 1024;
    editor.customConfig.uploadImgMaxLength = 5;
    editor.create();
</script>
</body>

</html>